<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilplmi: xplmi_tamper.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilplmi
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xplmi__tamper_8h.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xplmi_tamper.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains APIs for tamper processing routines. </p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date        Changes
----- ---- ---------- -------------------------------------------------------
1.0   ma   07/08/2022 Initial release
      ma   07/19/2022 Change XPlmi_ProcessTamperResponse return type to void
      kpt  07/19/2022 Added temporal macro to trigger secure lockdown
                                         if haltboot efuses are programmed
      ma   07/25/2022 Enhancements to secure lockdown code
1.1   bm   01/03/2023 Create Secure Lockdown as a Critical Priority Task
      dd   03/28/2023 Updated doxygen comments
      pre  03/02/2025 Added XPLMI_HALT_BOOT_SLD_TEMPORAL_CHECK_FOR_INPRGRESS_STS macro</pre><pre></pre><dl class="section note"><dt>Note</dt><dd></dd></dl>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a55863a73d281a529c22552ebbc4ae866"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xplmi__tamper_8h.html#a55863a73d281a529c22552ebbc4ae866">XPLMI_TRIGGER_TAMPER_TASK</a>&#160;&#160;&#160;(0U)</td></tr>
<tr class="memdesc:a55863a73d281a529c22552ebbc4ae866"><td class="mdescLeft">&#160;</td><td class="mdescRight">Trigger tamper as a Task.  <a href="#a55863a73d281a529c22552ebbc4ae866">More...</a><br/></td></tr>
<tr class="separator:a55863a73d281a529c22552ebbc4ae866"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7eaaa50d8255ab922d2584fa49d05a8d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xplmi__tamper_8h.html#a7eaaa50d8255ab922d2584fa49d05a8d">XPLMI_TRIGGER_TAMPER_IMMEDIATE</a>&#160;&#160;&#160;(1U)</td></tr>
<tr class="memdesc:a7eaaa50d8255ab922d2584fa49d05a8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Trigger tamper immediately.  <a href="#a7eaaa50d8255ab922d2584fa49d05a8d">More...</a><br/></td></tr>
<tr class="separator:a7eaaa50d8255ab922d2584fa49d05a8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5515b9ffcdf25f1878ba2a18d6fada7f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xplmi__tamper_8h.html#a5515b9ffcdf25f1878ba2a18d6fada7f">XPLMI_SLD_NOT_TRIGGERED</a>&#160;&#160;&#160;(0U)</td></tr>
<tr class="memdesc:a5515b9ffcdf25f1878ba2a18d6fada7f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Secure lockdown not triggered.  <a href="#a5515b9ffcdf25f1878ba2a18d6fada7f">More...</a><br/></td></tr>
<tr class="separator:a5515b9ffcdf25f1878ba2a18d6fada7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6dc820dc0ce358932426723d5d564831"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xplmi__tamper_8h.html#a6dc820dc0ce358932426723d5d564831">XPLMI_SLD_TRIGGERED</a>&#160;&#160;&#160;(1U)</td></tr>
<tr class="memdesc:a6dc820dc0ce358932426723d5d564831"><td class="mdescLeft">&#160;</td><td class="mdescRight">Secure lockdown triggered.  <a href="#a6dc820dc0ce358932426723d5d564831">More...</a><br/></td></tr>
<tr class="separator:a6dc820dc0ce358932426723d5d564831"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73133be49a71a2c1defd387dff0600d4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xplmi__tamper_8h.html#a73133be49a71a2c1defd387dff0600d4">XPLMI_SLD_IN_PROGRESS</a>&#160;&#160;&#160;(2U)</td></tr>
<tr class="memdesc:a73133be49a71a2c1defd387dff0600d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Secure lockdown is in progress.  <a href="#a73133be49a71a2c1defd387dff0600d4">More...</a><br/></td></tr>
<tr class="separator:a73133be49a71a2c1defd387dff0600d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8bb98ba40892a4903a132895b99740d8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xplmi__tamper_8h.html#a8bb98ba40892a4903a132895b99740d8">XPLMI_HALT_BOOT_SLD_TEMPORAL_CHECK</a>(MajorError, Status, StatusTmp, function,...)</td></tr>
<tr class="memdesc:a8bb98ba40892a4903a132895b99740d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the return value of the called function into Status and StatusTmp variables for redundancy.  <a href="#a8bb98ba40892a4903a132895b99740d8">More...</a><br/></td></tr>
<tr class="separator:a8bb98ba40892a4903a132895b99740d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga2f22c870cebbe3123b9eb458336bc4ed"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilplmi__server__apis.html#ga2f22c870cebbe3123b9eb458336bc4ed">XPlmi_RegisterTamperIntrHandler</a> (void)</td></tr>
<tr class="memdesc:ga2f22c870cebbe3123b9eb458336bc4ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function registers the handler for tamper interrupt.  <a href="group__xilplmi__server__apis.html#ga2f22c870cebbe3123b9eb458336bc4ed">More...</a><br/></td></tr>
<tr class="separator:ga2f22c870cebbe3123b9eb458336bc4ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga409ca4e187fb02b456319b706ea01e1f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilplmi__server__apis.html#ga409ca4e187fb02b456319b706ea01e1f">XPlmi_TriggerTamperResponse</a> (u32 Response, u32 Flag)</td></tr>
<tr class="memdesc:ga409ca4e187fb02b456319b706ea01e1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This functions Triggers Tamper Response processing immediately or as a task.  <a href="group__xilplmi__server__apis.html#ga409ca4e187fb02b456319b706ea01e1f">More...</a><br/></td></tr>
<tr class="separator:ga409ca4e187fb02b456319b706ea01e1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad4eebf5b872ad3d85898142943f2b1b4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilplmi__server__apis.html#gad4eebf5b872ad3d85898142943f2b1b4">XPlmi_TriggerSLDOnHaltBoot</a> (u32 Flag)</td></tr>
<tr class="memdesc:gad4eebf5b872ad3d85898142943f2b1b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function triggers secure lockdown if haltboot efuses are programmed.  <a href="group__xilplmi__server__apis.html#gad4eebf5b872ad3d85898142943f2b1b4">More...</a><br/></td></tr>
<tr class="separator:gad4eebf5b872ad3d85898142943f2b1b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa2236b1a5bcc98eba23dde0ad6939885"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilplmi__server__apis.html#gaa2236b1a5bcc98eba23dde0ad6939885">XPlmi_SldState</a> (void)</td></tr>
<tr class="memdesc:gaa2236b1a5bcc98eba23dde0ad6939885"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function returns Secure Lockdown State.  <a href="group__xilplmi__server__apis.html#gaa2236b1a5bcc98eba23dde0ad6939885">More...</a><br/></td></tr>
<tr class="separator:gaa2236b1a5bcc98eba23dde0ad6939885"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a8bb98ba40892a4903a132895b99740d8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XPLMI_HALT_BOOT_SLD_TEMPORAL_CHECK</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">MajorError, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">Status, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">StatusTmp, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">function, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">{ \</div>
<div class="line">                        XSECURE_TEMPORAL_IMPL(Status, StatusTmp, <span class="keyword">function</span>, __VA_ARGS__); \</div>
<div class="line">                        if ((Status != XST_SUCCESS) || (StatusTmp != XST_SUCCESS)) { \</div>
<div class="line">                                Status |= StatusTmp; \</div>
<div class="line">                                Status = XPlmi_UpdateStatus((XPlmiStatus_t)MajorError, Status); <a class="code" href="group__xilplmi__server__apis.html#gaa6f19eeebb4a42d17f8e2f62b01b0080">\</a></div>
<div class="line"><a class="code" href="group__xilplmi__server__apis.html#gaa6f19eeebb4a42d17f8e2f62b01b0080">				XPlmi_UtilRMW</a>(PMC_GLOBAL_PMC_FW_ERR, PMC_GLOBAL_PMC_FW_ERR_DATA_MASK, \</div>
<div class="line">                                        (u32)Status); <a class="code" href="group__xilplmi__server__apis.html#gad4eebf5b872ad3d85898142943f2b1b4">\</a></div>
<div class="line"><a class="code" href="group__xilplmi__server__apis.html#gad4eebf5b872ad3d85898142943f2b1b4">				XPlmi_TriggerSLDOnHaltBoot</a>(<a class="code" href="xplmi__tamper_8h.html#a55863a73d281a529c22552ebbc4ae866">XPLMI_TRIGGER_TAMPER_TASK</a>); \</div>
<div class="line">                        } \</div>
<div class="line">                }</div>
<div class="ttc" id="group__xilplmi__server__apis_html_gaa6f19eeebb4a42d17f8e2f62b01b0080"><div class="ttname"><a href="group__xilplmi__server__apis.html#gaa6f19eeebb4a42d17f8e2f62b01b0080">XPlmi_UtilRMW</a></div><div class="ttdeci">void XPlmi_UtilRMW(u32 RegAddr, u32 Mask, u32 Value)</div><div class="ttdoc">This function will Read, Modify and Write to a register. </div><div class="ttdef"><b>Definition:</b> xplmi_util.c:99</div></div>
<div class="ttc" id="xplmi__tamper_8h_html_a55863a73d281a529c22552ebbc4ae866"><div class="ttname"><a href="xplmi__tamper_8h.html#a55863a73d281a529c22552ebbc4ae866">XPLMI_TRIGGER_TAMPER_TASK</a></div><div class="ttdeci">#define XPLMI_TRIGGER_TAMPER_TASK</div><div class="ttdoc">Trigger tamper as a Task. </div><div class="ttdef"><b>Definition:</b> xplmi_tamper.h:44</div></div>
<div class="ttc" id="group__xilplmi__server__apis_html_gad4eebf5b872ad3d85898142943f2b1b4"><div class="ttname"><a href="group__xilplmi__server__apis.html#gad4eebf5b872ad3d85898142943f2b1b4">XPlmi_TriggerSLDOnHaltBoot</a></div><div class="ttdeci">void XPlmi_TriggerSLDOnHaltBoot(u32 Flag)</div><div class="ttdoc">This function triggers secure lockdown if haltboot efuses are programmed. </div><div class="ttdef"><b>Definition:</b> xplmi_tamper.c:345</div></div>
</div><!-- fragment -->
<p>Updates the return value of the called function into Status and StatusTmp variables for redundancy. </p>
<p>when called function returns a failure it triggers secure lockdown if haltboot efuses are programmed.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">MajorError</td><td>contains the major error code </td></tr>
    <tr><td class="paramname">Status</td><td>is the variable which holds the return value of function executed </td></tr>
    <tr><td class="paramname">StatusTmp</td><td>is the variable which holds the value stored in Status </td></tr>
    <tr><td class="paramname">function</td><td>is the function to be executed </td></tr>
    <tr><td class="paramname">Other</td><td>params are arguments to the called function</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>

</div>
</div>
<a class="anchor" id="a73133be49a71a2c1defd387dff0600d4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XPLMI_SLD_IN_PROGRESS&#160;&#160;&#160;(2U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Secure lockdown is in progress. </p>

<p>Referenced by <a class="el" href="group__xilplmi__server__apis.html#gaaa4e2fe96baa321cd17c045bffb049b5">XPlmi_ProcessCdo()</a>.</p>

</div>
</div>
<a class="anchor" id="a5515b9ffcdf25f1878ba2a18d6fada7f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XPLMI_SLD_NOT_TRIGGERED&#160;&#160;&#160;(0U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Secure lockdown not triggered. </p>

<p>Referenced by <a class="el" href="group__xilplmi__server__apis.html#ga409ca4e187fb02b456319b706ea01e1f">XPlmi_TriggerTamperResponse()</a>.</p>

</div>
</div>
<a class="anchor" id="a6dc820dc0ce358932426723d5d564831"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XPLMI_SLD_TRIGGERED&#160;&#160;&#160;(1U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Secure lockdown triggered. </p>

<p>Referenced by <a class="el" href="group__xilplmi__server__apis.html#ga409ca4e187fb02b456319b706ea01e1f">XPlmi_TriggerTamperResponse()</a>.</p>

</div>
</div>
<a class="anchor" id="a7eaaa50d8255ab922d2584fa49d05a8d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XPLMI_TRIGGER_TAMPER_IMMEDIATE&#160;&#160;&#160;(1U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Trigger tamper immediately. </p>

<p>Referenced by <a class="el" href="group__xilplmi__server__apis.html#ga0782e72375c56801fca2c8baa9469901">XPlmi_ErrMgr()</a>.</p>

</div>
</div>
<a class="anchor" id="a55863a73d281a529c22552ebbc4ae866"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XPLMI_TRIGGER_TAMPER_TASK&#160;&#160;&#160;(0U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Trigger tamper as a Task. </p>

<p>Referenced by <a class="el" href="group__xilplmi__server__apis.html#ga409ca4e187fb02b456319b706ea01e1f">XPlmi_TriggerTamperResponse()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
